﻿#pragma once
#include <cstdint>

namespace tools{

//-----------------------------Генерируем уникальный айди любого указателя -------------------------//
template <class Pointer> ::std::intptr_t GeneratePointerID(Pointer pointer)
{
    static_assert(
        sizeof(pointer) == sizeof(std::intptr_t), 
        "Size of given pointer and size of common pointer is differnet. Deal with it."
    );

	return reinterpret_cast<intptr_t>( *reinterpret_cast<void**>(&pointer));
}


}//namespace tools